﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="BaoCao.aspx.cs"
    Inherits="HoaDon.BaoCao" Title="Báo cáo doanh thu" %>

<asp:Content ID="cthoadon" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    <script type="text/javascript">
    $(document).ready(function () {
        $("#<%=dttuNgay.ClientID %>").dynDateTime({
            showsTime: true,
            ifFormat: "%d/%m/%Y",
            daFormat: "%l;%M %p, %e %m,  %Y",
            align: "BR",
            electric: false,
            singleClick: false,
            displayArea: ".siblings('.dtcDisplayArea')",
            button: ".next()"
        });
        
    });
        $(document).ready(function () {
        $("#<%=dtdenNgay.ClientID %>").dynDateTime({
            showsTime: true,
            ifFormat: "%d/%m/%Y",
            daFormat: "%l;%M %p, %e %m,  %Y",
            align: "BR",
            electric: false,
            singleClick: false,
            displayArea: ".siblings('.dtcDisplayArea')",
            button: ".next()"
        });
        
    });
    </script>

    <asp:Table ID="Table1" runat="server" Width="450px" Height="69px" Style="text-align: left">
        <asp:TableRow>
            <asp:TableCell Width="20%">Từ ngày</asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="dttuNgay" runat="server" Width="150px"></asp:TextBox>
                <img src="images/calender.png" alt="" /></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>Đến ngày</asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="dtdenNgay" runat="server" Width="150px"></asp:TextBox>
                <img src="images/calender.png" alt="" /></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>Nhân viên</asp:TableCell>
            <asp:TableCell>
                <asp:DropDownList ID="drnhanvien" runat="server" Width="150px">
                </asp:DropDownList>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>Cửa hàng</asp:TableCell>
            <asp:TableCell>
                <asp:DropDownList ID="drcuahang" runat="server" Width="150px">
                </asp:DropDownList>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>Khu vực</asp:TableCell>
            <asp:TableCell>
                <asp:DropDownList ID="drkhuvuc" runat="server" Width="150px">
                </asp:DropDownList>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>Nhóm hàng</asp:TableCell>
            <asp:TableCell>
                <asp:DropDownList ID="drnhomhang" runat="server" Width="150px">
                </asp:DropDownList>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell HorizontalAlign="Right">
            </asp:TableCell>
            <asp:TableCell HorizontalAlign="Left">
                <asp:Button ID="btOk" runat="server" Text="Xử lý" Width="75px" CssClass="my_btn_ok"
                    OnClick="btOk_Click" />
                &nbsp;
                <asp:Button ID="btIn" runat="server" Text="In" Width="75px" CssClass="my_btn_ok"
                    OnClick="btIn_Click" />
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:GridView ID="gdxbaocao" runat="server" AutoGenerateColumns="false" CssClass="GridViewInvoice">
                <Columns>
                    <asp:TemplateField HeaderText="Mã hàng">
                        <ItemTemplate>
                            <asp:Label ID="Ma_hang" runat="server" Text='<%# 
Eval("Ma_hang") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên hàng">
                        <ItemTemplate>
                            <asp:Label ID="Ten_hang" runat="server" Text='<%# 
Eval("Ten_hang")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Đvt">
                        <ItemTemplate>
                            <asp:Label ID="Dvt" runat="server" Text='<%#
Eval("Dvt") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Số lượng">
                        <ItemTemplate>
                            <div style="text-align: right;">
                                <asp:Label ID="So_luong" runat="server" Text='<%#
Eval("So_luong", "{0:#,#}") %>'></asp:Label>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Giá bán">
                        <ItemTemplate>
                            <div style="text-align: right;">
                                <asp:Label ID="Gia_ban" runat="server" Text='<%# 
Eval("Gia_ban", "{0:#,#}") %>'></asp:Label>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Doanh thu">
                        <ItemTemplate>
                            <div style="text-align: right;">
                                <asp:Label ID="Doanh_thu" runat="server" Text='<%# 
Eval("Doanh_thu", "{0:#,#}") %>'></asp:Label>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Giá vốn">
                        <ItemTemplate>
                            <div style="text-align: right;">
                                <asp:Label ID="Gia_von" runat="server" Text='<%# 
Eval("Gia_von", "{0:#,#}") %>'></asp:Label>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tiền vốn">
                        <ItemTemplate>
                            <div style="text-align: right;">
                                <asp:Label ID="Tien_von" runat="server" Text='<%# 
Eval("Tien_von", "{0:#,#}") %>'></asp:Label>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Lãi">
                        <ItemTemplate>
                            <div style="text-align: right;">
                                <asp:Label ID="Lai" runat="server" Text='<%# 
Eval("Lai", "{0:#,#}") %>'></asp:Label>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btOk" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
